<template>
	<div id="swiper">
		<swiper class="imgBox" :options="swiperOption">
			<swiper-slide  v-for="(item,index) in banners" :key="index">
				<img class="swiperImg" :src="item.picUrl" />
			</swiper-slide>
		</swiper>
		<!--分页器-->
		<div class="swiper-pagination"></div>
	</div>
</template>

<script>
	export default {
		name: "banner",
		data() {
			return {
				banner: "",

				swiperOption: {
					loop: true,
					autoplay: {
						delay:2000,
						disableOnInteraction : false,
					},
					
					pagination: {
						el: ".swiper-pagination",
						paginationClickable :true
					},
					
				}
			}
		},
		props: {
			banners: Array
		}

	}
</script>

<style lang="scss" scoped>
	@import "~@/assets/css/common.scss";
	#swiper {
		position: relative;
		display: flex;
		align-items: flex-end;
		background:#fff;
		.imgBox {
			width: 90%;
			height:vw(150);
			border-radius:vw(10);
			overflow:hidden;
			.swiperImg {
				width: 100%;
			}
		}
	}
</style>
<style lang="scss">
	@import "~@/assets/css/common.scss";
	
	.swiper-pagination {
		bottom: vw(-2);
		left: 50%;
		transform: translateX(-50%);
		.swiper-pagination-bullet {
			margin:4px;
			background:white;
		}
	}
</style>